home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 076-100 / 085 / csh / globals.c < prev    next >
C/C++ Source or Header  |  1995-03-13  |  3KB  |  89 lines

  1.  
  2. /*
  3.  * GLOBALS.C
  4.  *
  5.  * (c)1986 Matthew Dillon     9 October 1986
  6.  *
  7.  * version 2.06M (Manx Version and Additions) by Steve Drew 28-May-87
  8.  *
  9.  *    Most global variables.
  10.  *
  11.  */
  12.  
  13.  
  14. #include "shell.h"
  15.  
  16. struct HIST *H_head, *H_tail;            /* HISTORY lists      */
  17.  
  18. struct PERROR Perror[] = {            /* error code->string */
  19.    103,     "insufficient free storage",
  20.    105,     "task table full",
  21.    120,     "argument line invalid or too long",
  22.    121,     "file is not an object module",
  23.    122,     "invalid resident library during load",
  24.    201,     "no default directory",
  25.    202,     "object in use",
  26.    203,     "object already exists",
  27.    204,     "directory not found",
  28.    205,     "object not found",
  29.    206,     "bad stream name",
  30.    207,     "object too large",
  31.    209,     "action not known",
  32.    210,     "invalid stream component name",
  33.    211,     "invalid object lock",
  34.    212,     "object not of required type",
  35.    213,     "disk not validated",
  36.    214,     "disk write protected",
  37.    215,     "rename across devices",
  38.    216,     "directory not empty",
  39.    217,     "too many levels",
  40.    218,     "device not mounted",
  41.    219,     "seek error",
  42.    220,     "comment too long",
  43.    221,     "disk full",
  44.    222,     "file delete protected",
  45.    223,     "file write protected",
  46.    224,     "file read protected",
  47.    225,     "not a DOS disk",
  48.    226,     "no disk",
  49.    232,     "no more entries in directory",
  50.  
  51.    /* custom error messages */
  52.  
  53.    500,     "bad arguments",
  54.    501,     "label not found",
  55.    502,     "must be within source file",
  56.    503,     "Syntax Error",
  57.    504,     "redirection error",
  58.    505,     "pipe error",
  59.    506,     "too many arguments",
  60.    507,     "destination not a directory",
  61.    508,     "cannot mv a filesystem",
  62.      0,     NULL
  63. };
  64.  
  65.  
  66. char  *av[MAXAV];          /* Internal argument list            */
  67. long  Src_base[MAXSRC];          /* file pointers for source files        */
  68. long  Src_pos[MAXSRC];          /* seek position storage for same        */
  69. char  If_base[MAXIF];          /* If/Else stack for conditionals        */
  70. int   H_len, H_tail_base;     /* History associated stuff        */
  71. int   H_stack;              /* AddHistory disable stack        */
  72. int   E_stack;              /* Exception disable stack        */
  73. int   Src_stack, If_stack;    /* Stack Indexes                */
  74. int   ac;              /* Internal argc                */
  75. int   debug;              /* Debug mode                */
  76. int   disable;              /* Disable com. execution (conditionals)    */
  77. int   Verbose;              /* Verbose mode for source files        */
  78. int   Lastresult;          /* Last return code            */
  79. int   Exec_abortline;          /* flag to abort rest of line        */
  80. int   Exec_ignoreresult;      /* flag to ignore result            */
  81. int   Quit;              /* Quit flag                */
  82. long  Cout, Cin;          /* Current input and output file handles    */
  83. long  Cout_append;          /* append flag for Cout            */
  84. long  Uniq;              /* unique value                */
  85. char  *Cin_name, *Cout_name;  /* redirection input/output name or NULL    */
  86. char  *Pipe1, *Pipe2;          /* the two pipe temp. files        */
  87. struct Process *Myprocess;
  88. int   S_histlen = 20;          /* Max # history entries            */
  89.